<?php
/**
 * Created by PhpStorm.
 * User: li
 * Date: 2019/2/1
 * Time: 12:50
 */

namespace app\admin\model;


use think\Model;
use traits\model\SoftDelete;

class Excel extends Model
{
    use SoftDelete;
    protected $deleteTime = 'delete_time';
    protected $autoWriteTimestamp = true;

    
    /*
     * 判断Excel数据在数据库是否存在
     * @param int $uid 用户id
     * @param string $date 时间戳
     * */
    public function findExcelData($uid,$date){
        $w['B'] = $uid;
        $w['D'] = date('Ymd',$date);
        $res = $this->field('create_time,update_time,delete_time',true)->where($w)->find();
        if (empty($res)){
            return false;
        }else{
            return $res->toArray();
        }
        
        
    }


}